package com.har.modules.business.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.har.common.utils.PageUtils;
import com.har.common.utils.Query;
import com.har.modules.business.dao.TUserDao;
import com.har.modules.business.entity.TUserEntity;
import com.har.modules.business.service.TUserService;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @author macwy
 * @Title:har-finance
 * @Package com.har.modules.business.service.impl
 * @Description
 * @date 2018/7/18 15:40
 * @Version 1.0
 */
@Service("userService")
public class TUserServiceImpl extends ServiceImpl<TUserDao, TUserEntity> implements TUserService {


    @Override
    public PageUtils queryPage(Map<String, Object> params) {


        EntityWrapper<TUserEntity> ew = new EntityWrapper<>();
        ew.orderBy("update_time",false);

        Page<TUserEntity> page = this.selectPage(
                new Query<TUserEntity>(params).getPage(),
                ew
        );

        return new PageUtils(page);
    }
}
